package com.rentplant.service.impl;

import com.alibaba.fastjson.JSONObject;
import com.rentplant.Pojo.address;
import com.rentplant.mapper.addressMapper;
import com.rentplant.mapper.userMapper;
import com.rentplant.service.addressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class addressServiceImp implements addressService {

    @Autowired
    private addressMapper addressmapper;


//    获取用户收货地址
    @Override
    public List<address> addressInfo(String openid) {
        return addressmapper.addressInfo(openid);
    }

//    新增收货地址
    @Override
    public boolean addAddress(JSONObject addressInfo){
        return addressmapper.addAddress(addressInfo);
    }

//    修改地址
    @Override
    public boolean updateAddress(JSONObject addressInfo){
        return addressmapper.updateAddress(addressInfo);
    }

//    删除地址
    @Override
    public  boolean delAddress(JSONObject addressInfo){return addressmapper.delAddress(addressInfo);}

}
